From: Jonas Dreßler Date: Thu, 26 May 2022 16:13:12 +0000 (+0200) Subject: keyboard: Reset height before requesting preferred height X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~461^2^2~337 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a3bfe0ab560ed214c888b79daca89975fed9604e;p=gnome-shell.git keyboard: Reset height before requesting preferred height If we don't set the height property to -1 before requesting the preferred height, get_preferred_height() will just return us the fixed height that has been set before. We don't want this behavior here, so set the height to -1 before calling get_preferred_height(). This fixes a resizing issue where the keyboard is sized incorrectly after switching the monitor into portrait mode and back. Part-of: --- diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index e0c42219e..b9e3aec60 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -1697,6 +1697,7 @@ var Keyboard = GObject.registerClass({ * we allow the OSK being smaller than 1/3rd of the monitor height * there. */ + this.height = -1; const forWidth = this.get_theme_node().adjust_for_width(monitor.width); const [, natHeight] = this.get_preferred_height(forWidth); this.height = Math.min(maxHeight, natHeight);